import request from '@/utils/request'

// 查询视频信息列表
export function listVideo(query) {
    return request({
        url: '/operater/video/list',
        method: 'get',
        params: query
    })
}

// 查询视频信息详细
export function getVideo(id) {
    return request({
        url: '/operater/video/' + id,
        method: 'get'
    })
}

// 修改视频状态
export function updateState(data) {
    return request({
        url: `/operater/video/examine?id=${data.id}&newsRemarks=${data.newsRemarks}&yesOrNo=${data.yesOrNo}`,
        method: 'put'
    })
}
// 新增视频信息
export function addVideo(data) {
    return request({
        url: '/operater/video',
        method: 'post',
        data: data
    })
}

// 修改视频信息
export function updateVideo(data) {
    return request({
        url: '/operater/video',
        method: 'put',
        data: data
    })
}

// 删除视频信息
export function delVideo(id) {
    return request({
        url: '/operater/video/' + id,
        method: 'delete'
    })
}

// 导出视频信息
export function addVideoFiles(query) {
    return request({
        url: '/operater/video/addVideoFiles',
        method: 'post',
        params: query
    })
}
// 获取视频详情
export function getVideoDetail(id) {
    return request({
        url: '/operater/video/getDetailedInfo/' + id,
        method: 'get'
    })
}